#define _CRT_SECURE_NO_WARNINGS 1

#include "RBTree.h"

//while (parent && parent->col == RED)
//{
//	Node* grandfather = parent->parent;
//}
//else if (parent == grandparent->right)
//{
//	Node* uncle = grandparent->left;
//	if (unlce->col = RED)
//	{
//		parent->col = black;
//		uncle->col = black;
//		grandparent->col = RED;
//
//		cur = grandfather;
//		parent = cur->parent;
//	}
//	else
//	{
//		if (cur = parent->right)
//		{
//			RotateL(grandfather);
//			grandfather->col = RED;
//			parent->col = BLACK;
//		}
//		else
//		{
//			RotateR(parent);
//			RotateL(grandfather);
//
//			cur->col = BLACK;
//			grandfather->col = RED;
//		}
//
//		break;
//	}
//}

#include <vector>
int main() {
	vector<int> v;

	srand((unsigned int)time(NULL));

	for (int i = 0; i < 10000; i++)
	{
		v.push_back(rand());
	}

	RBTree<int, int> rb;
	for (auto e : v)
	{
		rb.Insert(make_pair(e, e));
	}

	cout << rb.IsValidRBTRee() << endl;

	return 0;
}